//
//  LXSignShowContractTableViewCell.m
//  ZuLinProject
//
//  Created by bancheng on 2022/3/22.
//  Copyright © 2022 LX_App. All rights reserved.
//

#import "LXSignShowContractTableViewCell.h"
@interface LXSignShowContractTableViewCell()
@end
@implementation LXSignShowContractTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    
    [self setBtnSpacing];
    

    
}


-(void)setBtnSpacing{
    
    self.contractTipsLab.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0.8];
    [self.contractTipsLab addCorner:3];
    [self.contractImageV addCorner:3];
    [self.checkImageV addCorner:3];
    [self.driverImageV addCorner:3];
    [self.carImageV addCorner:3];
   
    self.headNumLab.backgroundColor = [UIColor.blackColor colorWithAlphaComponent:0.8];
    
    [self performSelector:@selector(setLine) withObject:nil afterDelay:0.1];

    
}
- (void)setLine{
    
    [self.contractBackView setLineDashPattern:@[@4,@2] withColor:[UIColor colorWithHexString:@"#C4C4C4"] withCornerRadius:5];
    [self.checkCarBackView setLineDashPattern:@[@4,@2] withColor:[UIColor colorWithHexString:@"#C4C4C4"] withCornerRadius:5];
    [self.driverView setLineDashPattern:@[@4,@2] withColor:[UIColor colorWithHexString:@"#C4C4C4"] withCornerRadius:5];
    [self.carView setLineDashPattern:@[@4,@2] withColor:[UIColor colorWithHexString:@"#C4C4C4"] withCornerRadius:5];
}

// 合同照片数据源
- (void)setContractData:(NSArray *)contractData{
    _contractData = contractData;
    // 合同
    NSString *url = contractData.firstObject;
    [self.contractImageV sd_setImageWithURL:[NSURL URLWithString:url] placeholderImage:Image(@"暂无图片")];
    self.headNumLab.text = [NSString stringWithFormat:@"共%@张",@(contractData.count)];

}



#pragma mark -- 显示大图
+(void)showBigImage:(UIImage *)image{
    UIWindow *window = [BaseViewController getCurrentWindow];
    ShowBigImageWithFrameView *ImageShow = [[ShowBigImageWithFrameView alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, B_HEIGHT) withImage:image];
    [window addSubview:ImageShow];
}

@end
